// RoadCell.cpp

#include "RoadCell.hpp"

RoadCell::RoadCell() : Cell()
{
	init();
}

RoadCell::RoadCell(int x, int y) : Cell(x,y)
{
	init();
}

RoadCell::~RoadCell()
{
}

void RoadCell::init()
{
	speedLimit = 0;
	entry = 0;
	exit = false;
	pedestrianArea = false;
}
int RoadCell::getSpeedLimit()
{
	return this->speedLimit;
}

int RoadCell::getEntry()
{
	return this->entry;
}

int RoadCell::getExit()
{
	return this->exit;
}

bool RoadCell::getPedestrianArea()
{
	return this->pedestrianArea;
}

QHash<int,QPoint> RoadCell::getPath()
{
	return this->path;
}

QPoint RoadCell::getPath(int id)
{
	return this->path.value(id);
}

QHash<int,QPoint> RoadCell::getInduction()
{
	return this->induction;
}

QHash<QString,int> RoadCell::getLights()
{
	return this->lights;
}

QHash<QString,QString> RoadCell::getBorders()
{
	return this->borders;
}

void RoadCell::setEntry(int entry)
{
	this->entry = entry;
}

void RoadCell::setExit(bool exit)
{
	this->exit = exit;
}

void RoadCell::setSpeedLimit(int speedLimit)
{
	this->speedLimit = speedLimit;
}

void RoadCell::setPedestrianArea(bool flag)
{
	this->pedestrianArea = flag;
}

void RoadCell::setPath(int index, QPoint point)
{
	this->path[index] = point;
}

void RoadCell::setInduction(int index, QPoint point)
{
	this->induction[index] = point;
}

void RoadCell::setLight(QString type, int value)
{
	this->lights[type] = value;
}

void RoadCell::setBorder(QString type, QString value)
{
	this->borders[type] = value;
}


